<!doctype html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

    <title>{% block title %}Welcome!{% endblock %}</title>

    {% block stylesheets %}
        <link href="https://fonts.googleapis.com/css?family=Open+Sans:300,300i,400,400i,500,500i,600,600i&display=swap" rel="stylesheet" />
        {{ encore_entry_link_tags('app') }}
    {% endblock %}
</head>
<body>
<header class="header">
    <h1 class="sr-only">
        {{ 'Conference Guestbook'|trans }}
    </h1>

    <nav class="navbar navbar-expand-xl navbar-light bg-light">
        <div class="container mt-4 mb-3">
            <a class="navbar-brand mr-4 pr-2" href="{{ path('homepage') }}">
                &#128217; {{ 'Conference Guestbook'|trans }}
            </a>

            <button class="navbar-toggler border-0" type="button" data-toggle="collapse" data-target="#header-menu" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Afficher/Cacher la navigation">
                <span class="navbar-toggler-icon"></span>
            </button>

            <div class="collapse navbar-collapse" id="header-menu">
                <ul class="navbar-nav ml-auto">
                    <li class="nav-item mr-3">
                        <a class="nav-link" href="{{ path('admin_conference_list') }}">
                            Admin
                        </a>
                    </li>
                    <li class="nav-item dropdown">
                        <a class="nav-link dropdown-toggle" href="#" id="dropdown-language" role="button"
                                data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                            {{ app.request.locale|locale_name(app.request.locale)|u.title }}
                        </a>
                        <div class="dropdown-menu dropdown-menu-right" aria-labelledby="dropdown-language">
                            <a class="dropdown-item" href="{{ path('homepage', {_locale: 'en'}) }}">English</a>
                            <a class="dropdown-item" href="{{ path('homepage', {_locale: 'fr'}) }}">Français</a>
                            <a class="dropdown-item" href="{{ path('homepage', {_locale: 'zh_CN'}) }}">China</a>
                        </div>
                    </li>
                </ul>
            </div>
        </div>
    </nav>

    <nav class="bg-light border-bottom">
        <div class="container">
            {{ render_esi(path('conference_header')) }}
        </div>
    </nav>
</header>

<main role="main" class="container mt-5">
    {% block body %}{% endblock %}
</main>

<footer class="mt-7 px-3 py-5 text-center text-muted">
    <p>
        {{ 'Conference Guestbook'|trans }}
    </p>
    <p>
        <a href="#" class="text-white">Back to top</a>
    </p>
</footer>

{% block javascripts %}
    {{ encore_entry_script_tags('app') }}
{% endblock %}
</body>
</html>
